cmake_minimum_required(VERSION 3.14)
project(LearnC)

set(CMAKE_CXX_STANDARD 14)

# Add the source in project root directory
aux_source_directory(. DIRSRCS)
# Add header file include directories
include_directories(./ ./learnString ./xiangxue ./dongnao ./leetcode ./learnCpp ./cppDemo ./testMMKV ./base)
# Add block directories
add_subdirectory(learnString)
add_subdirectory(dongnao)
add_subdirectory(xiangxue)
add_subdirectory(learnCpp)
add_subdirectory(cppDemo)
add_subdirectory(testMMKV)

add_subdirectory(leetcode)

add_executable(LearnC main.c)
# 增加可执行
add_executable(xiangxueRun xiangxue/ndk_01.c)
add_executable(xiangxueRun2 xiangxue/TestFile.c)


add_executable(learnCppRun learnCpp/LearnCpp.cpp)
add_executable(CppDemo01 learnCpp/CppDemo01.cpp)
add_executable(CppDemo02 learnCpp/CppDemo02.cpp)
add_executable(identification cppDemo/Identification.cpp)
add_executable(MMKVTherad testMMKV/TestThread.cpp)
add_executable(MMKVTherad2 testMMKV/TestThread2.cpp)


add_executable(leetcode0001Run leetcode/LeetCode0001.c)
add_executable(leetcode0028Run leetcode/LeetCode0028.cpp)
add_executable(leetcode0718Run leetcode/LeetCode0718.cpp)
add_executable(leetcode0344Run leetcode/LeetCode0344.c)
add_executable(leetcode0155Run leetcode/LeetCode0155.c)
add_executable(leetcode0046Run leetcode/LeetCode0046.c)

add_executable(base base/TestBaseKnowledgePoint.cpp)

target_link_libraries(leetcode0001Run leetcode)

# Target
# 配置库的依赖关系(链接关系)
#target_link_libraries(LearnC learnString )
#target_link_libraries(xiangxueC xiangxue )

